﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BusinessObjects.BusinessRules;

namespace BusinessObjects.Person
{
    public class WorkerShift : BusinessObject
    {
        public WorkerShift()
        {
            AddRule(new ValidateRequired("WorkerShiftID"));

            AddRule(new ValidateRequired("WorkerShiftCode"));
            AddRule(new ValidateLength("WorkerShiftCode", 0, 20));

            AddRule(new ValidateRequired("WorkerShiftName"));
            AddRule(new ValidateLength("WorkerShiftName", 0, 50));

            AddRule(new ValidateRequired("RestaurantID"));
        }

        public WorkerShift(string workerShiftId, string workerShiftCode, string workerShiftName, string startTime, string endTime, bool isMonday,
                            bool isTuesday, bool isWednesday, bool isThursday, bool isFriday, bool isSaturday, bool isSunday, 
                            string restaurantId, string description)
            : this()
        {
            WorkerShiftID = workerShiftId;
            WorkerShiftCode = workerShiftCode;
            WorkerShiftName = workerShiftName;
            StartTime = startTime;
            EndTime = endTime;
            IsMonday = isMonday;
            IsTuesday = isTuesday;
            IsWednesday = isWednesday;
            IsThursday = isThursday;
            IsFriday = isFriday;
            IsSaturday = isSaturday;
            IsSunday = isSunday;
            RestaurantID = restaurantId;
            Description = description;
        }

        public string WorkerShiftID { get; set; }

        public string WorkerShiftCode { get; set; }

        public string WorkerShiftName { get; set; }

        public string StartTime { get; set; }

        public string EndTime { get; set; }

        public bool IsMonday { get; set; }

        public bool IsTuesday { get; set; }

        public bool IsWednesday { get; set; }

        public bool IsThursday { get; set; }

        public bool IsFriday { get; set; }

        public bool IsSaturday { get; set; }

        public bool IsSunday { get; set; }

        public string RestaurantID { get; set; }

        public string Description { get; set; }
    }
}
